package com.example.no1admin.search.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Document(indexName = "tp_route_index")
public class RouteForES implements Serializable {
    /**
     * 路线id
     */
    @Id
    private Long id;

    /**
     * 路线名字
     */
    @Field(name = "name",type = FieldType.Text,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String name;

    /**
     * 路线关键字
     */
    @Field(name="keywords",type = FieldType.Text,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String keywords;

    /**
     * 路线简介
     */
    @Field(name="description",type = FieldType.Text,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String description;

    /**
     * 是否启用，1=启用，0=未启用
     */
    @Field(name="enable")
    @ApiModelProperty(value="是否启用，1=启用，0=未启用")
    private Integer enable;


    /**
     * 相册id
     */
    @Field(name="albumId")
    private Long albumId;
}
